# 此接口为高级用户的删除接口，仅删除MySQL数据库的信息

from Flask_run import db
from database.models.mri import Mri
from database.models.patient import Patient


def delete(study_id):
  try:
    item = db.session.query(Mri).filter(Mri.study_id==study_id).first()
    db.session.delete(item)
    db.session.commit()
  except:
    status=0
  else:
    status=1
  return status